using System;
using OS.Infrastructure.Domain;
using OS.Infrastructure.NHibernate.Mappings;

namespace Domain.NHibernate.Mappings
{
    public class UrlMap:BaseMap<Url>
    {
        public UrlMap()
        {
            //Id(x => x.Id).GeneratedBy.Identity();
            Map(x => x.ShortKey);
            Map(x => x.LongUrl).Not.Nullable();
            Map(x => x.ClickUrl);
            Map(x => x.Date);
            Map(x => x.Anonymous);
            References(x => x.Account).Column("AccountID").Cascade.All();
        }

        //public int Id
        //{
        //    get { throw new NotImplementedException(); }
        //    set { throw new NotImplementedException(); }
        //}
    }
}